.TH deductionguidesforstd::basic_regex 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
deductionguidesforstd::basic_regex \- deductionguidesforstd::basic_regex

.SH Synopsis
   Defined in header <regex>
   template< class ForwardIt >

   basic_regex( ForwardIt, ForwardIt,
                std::regex_constants::syntax_option_type =                \fI(since C++17)\fP
   std::regex_constants::ECMAScript )

   -> basic_regex<typename std::iterator_traits<ForwardIt>::value_type>;

   This deduction guide is provided for std::basic_regex to allow deduction from an
   iterator range.

.SH Example


// Run this code

 #include <regex>
 #include <vector>

 int main()
 {
     std::vector<char> v = {'a', 'b', 'c'};
     std::basic_regex re(v.begin(), v.end()); // uses explicit deduction guide
 }
